import request from '@/utils/request'

// 新增文件
export const createCloud = (data) => request({
  url: '/admin/qiNiu/content',
  method: 'post',
  data
})

// 删除文件
export const deleteCloud = (data, configId) => request({
  url: `/admin/qiNiu/content?configId=${configId}`,
  method: 'delete',
  data
})

// 修改文件
export const updateCloud = (data) => request({
  url: '/admin/qiNiu/content',
  method: 'put',
  data
})

// 单个查询文件
export const queryCloud = (id) => request({
  url: '/admin/qiNiu/content',
  method: 'get',
  params: { id }
})

// 分页查询文件
export const pageQuery = (data) => request({
  url: '/admin/qiNiu/content/page',
  method: 'post',
  data
})

// 同步七牛云文件
export const synchronize = (configId) => request({
  url: `/admin/qiNiu/content/synchronize?configId=${configId}`,
  method: 'post'
})
